//设置固定值
const Token = 'adminToken' //用户Token
const UserInfo = "userInfo" //用户信息
const InstId = "instId" //机构ID
const Lock = "lock" //锁

//设置token
export function setToken(token) {
    sessionStorage.setItem(Token,token);
}

//获取token
export function getToken() {
   return sessionStorage.getItem(Token);
}

//删除token
export function removeToken() {
    sessionStorage.removeItem(Token);
}

//设置userInfo
export function setUserInfo(userInfo) {
    localStorage.setItem(UserInfo,userInfo);
}

//获取userInfo
export function getUserInfo() {
   return localStorage.getItem(UserInfo);
}

//删除userInfo
export function removeUserInfo() {
    localStorage.removeItem(UserInfo);
}

//设置instId
export function setInstId(instId) {
    localStorage.setItem(InstId,instId);
}

//获取instId
export function getInstId() {
   return localStorage.getItem(InstId);
}

//删除instId
export function removeInstId() {
    localStorage.removeItem(InstId);
}

//设置lock
export function setLock(lock) {
    localStorage.setItem(Lock,lock);
}

//获取lock
export function getLock() {
   return localStorage.getItem(Lock);
}

//删除lock
export function removeLock() {
    localStorage.removeItem(Lock);
}

//退出登录删除相关信息
export function removeAll() {
	removeToken();
	removeUserInfo();
	removeInstId();
	removeLock();
}